package com.qianda.qdminiapp.domain.model.device;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 
 * </p>
 *
 * @author cw
 * @since 2019-08-07
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("DEVICE")
public class Device extends Model<Device> {

    private static final long serialVersionUID = 1L;

    /**
     * 设备id
     */
    @TableId(value = "DEVICE_ID", type = IdType.AUTO)
    private Integer deviceId;

    /**
     * 设备的ccid
     */
    @TableField("DEVICE_CCID")
    private String deviceCcid;

    /**
     * 毛巾机类型
     */
    @TableField("DEVICE_TYPE")
    private Integer deviceType;

    /**
     * 毛巾机的状态-关联字典表
     */
    @TableField("DEVICE_STATUS")
    private Integer deviceStatus;

    /**
     * 毛巾价格
     */
    @TableField("DEVICE_PRICE")
    private BigDecimal devicePrice;

    /**
     * 毛巾余量
     */
    @TableField("DEVICE_MARGIN")
    private Integer deviceMargin;

    /**
     * 毛巾机的经度
     */
    @TableField("DEVICE_LOGNITUDE")
    private Double deviceLognitude;

    /**
     * 毛巾机的纬度
     */
    @TableField("DEVICE_LATITUDE")
    private Double deviceLatitude;

    /**
     * 设备所属省份id
     */
    @TableField("DEVICE_PROVINCE_ID")
    private Integer deviceProvinceId;

    /**
     * 设备所属市级id
     */
    @TableField("DEVICE_CITY_ID")
    private Integer deviceCityId;

    /**
     * 毛巾机所属县级id
     */
    @TableField("DEVICE_DISTRICT_ID")
    private Integer deviceDistrictId;

    /**
     * 毛巾机关联用户id
     */
    @TableField("DEVICE_USER_ID")
    private String deviceUserId;

    /**
     * 服务商ID
     */
    @TableField("DEVICE_SERVICE_ID")
    private Integer deviceServiceId;

    /**
     * 毛巾机地址（字符串描述）
     */
    @TableField("DEVICE_ADDRESS")
    private String deviceAddress;

    /**
     * 创建该毛巾机的时间
     */
    @TableField("CREATE_TIME")
    private String createTime;

    /**
     * 申请的单号id
     */
    @TableField("DEVICE_APPLICATION_ID")
    private String deviceApplicationId;

    /**
     * 推介人id
     */
    @TableField("INTRODUCER_ID")
    private String introducerId;

    /**
     * 红包获得概率
     */
    @TableField("HONGBAO_PROBABILITY")
    private Double hongbaoProbability;

    /**
     * 红包金额
     */
    @TableField("HONGBAO_MONEY")
    private Double hongbaoMoney;

    /**
     * 设备当前连接的sessionid
     */
    @TableField("DEVICE_CURRENT_SESSION_ID")
    private Long deviceCurrentSessionId;

    @TableField("DEVICE_CUTLENGTH")
    private Integer deviceCutlength;

    @TableField("DEVICE_CUTHOT")
    private Integer deviceCuthot;

    @TableField("DEVICE_CUTH2O")
    private Integer deviceCuth2o;

    /**
     * 毛巾长度
     */
    @TableField("DEVICE_LENGTH")
    private Integer deviceLength;

    /**
     * 是否为浴巾机
     */
    @TableField("DEVICE_ISYJJ")
    private Integer deviceIsyjj;

    /**
     * 设备库存
     */
    @TableField("DEVICE_INVENTORY")
    private Integer deviceInventory;

    /**
     * 设备详细地址
     */
    @TableField("DEVICE_ADDRESS_DETAIL")
    private String deviceAddressDetail;

    /**
     * 此设备总共出巾数量
     */
    @TableField("DEVICE_FULLUSED")
    private Integer deviceFullused;

    @TableField("DEVICE_ISFULI")
    private Integer deviceIsfuli;

    @TableField("DEVICE_TWOFORFREE")
    private Integer deviceTwoforfree;

    @TableField("DEVICE_STORENAME")
    private String deviceStorename;

    @TableField("DEVICE_ACCS_ID")
    private Integer deviceAccsId;

    @TableField("DEVICE_INSTALL_DATE")
    private LocalDateTime deviceInstallDate;

    @TableField("DEVICE_STORE_OWNER")
    private String deviceStoreOwner;

    @TableField("DEVICE_STORE_MOBILE")
    private String deviceStoreMobile;

    @TableField("DEVICE_STORE_ID")
    private Long deviceStoreId;

    @TableField("DEVICE_MODIFIER")
    private Long deviceModifier;

    @TableField("DEVICE_MODIFIER_DATE")
    private LocalDateTime deviceModifierDate;

    @TableField("DEVICE_PROVINCE_CODE")
    private Integer deviceProvinceCode;

    @TableField("DEVICE_CITY_CODE")
    private Integer deviceCityCode;

    @TableField("DEVICE_CITYPARTNER_ID")
    private Integer deviceCitypartnerId;

    @TableField("DEVICE_PROVINCEAGENT_ID")
    private Integer deviceProvinceagentId;

    private Integer outputCount;

    @TableField("DEVICE_SERVICEMAN_ID")
    private Integer deviceServicemanId;

    @TableField("DEVICE_REMARK")
    private String deviceRemark;

    /**
     * 是否参与新用户活动 0：不参与   1:参与
     */
    @TableField("DEVICE_NEW_ACTIVITY")
    private Integer deviceNewActivity;

    /**
     * 设备协议版本
     */
    @TableField("DEVICE_PROTOCOLE_V")
    private Integer deviceProtocoleV;

    @Override
    protected Serializable pkVal() {
        return this.deviceId;
    }

}
